import 'package:gzmall_app/model/product.dart';
import 'package:json_annotation/json_annotation.dart';

part 'seckills.g.dart';

@JsonSerializable()
class Seckills extends Object {
  @JsonKey(name: 'id')
  int id;

  @JsonKey(name: 'start_at')
  String startAt;

  @JsonKey(name: 'start_time_at')
  String startTimeAt;

  @JsonKey(name: 'end_at')
  String endAt;

  @JsonKey(name: 'end_time_at')
  String endTimeAt;

  @JsonKey(name: 'spu')
  Product spu;

  Seckills(
    this.id,
    this.startAt,
    this.startTimeAt,
    this.endAt,
    this.endTimeAt,
    this.spu,
  );

  factory Seckills.fromJson(Map<String, dynamic> srcJson) =>
      _$SeckillsFromJson(srcJson);
}
